#ifndef _UTIL_H
#define _UTIL_H
#ifdef __cplusplus
typedef struct _qq_emoticon qq_emoticon;
struct _qq_emoticon {
        unsigned char index;
        unsigned char symbol;
        const char *name;
};
extern qq_emoticon emoticons_std[];
extern qq_emoticon emoticons_sym[];

extern "C"
{
#endif
extern unsigned int emoticons_sym_num;
extern unsigned int emoticons_std_num;
int mkdir_recursive( char* path, char tokchr = '/' );
int trans_faces( char* src, char* dst, int outlen );
static const char *emoticon_get(unsigned int symbol);
unsigned char emoticon_get_index(unsigned char symbol);
int pack_faces( char* src, char* dst, int outlen );
int http_request( int* http_sock, char* url, char* session, char* data, int* datalen );
char* mid_value( char* str, const char* left, const char* right, char* out, int outlen );
void msleep( unsigned int ms );
int get_splitable_pos( char* buf, int pos );
#ifndef __linux__
char *strtok_r(char *str, const char *delim, char **save);
#endif
#ifdef __cplusplus
}
#endif
#endif

